﻿<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="static/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.min.css" />
<link href="lib/Hui-iconfont/1.0.9/iconfont.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="static/css/style.css" />
<!--[if lt IE 9]>
<link href="static/css/H-ui.ie.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>直播控制</title>
<meta name="keywords" content="关键词,5个左右,单个8汉字以内">
<meta name="description" content="网站描述，字数尽量空制在80个汉字，160个字符以内！">
<style>
  .act-name{
    display:inline-block;
    width:175px;
    margin-right: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
  }

  .multi-stream-tag{
    display:inline-block;
    width:32px;
    border:1px solid #465567;
      border-radius: 2px;
    text-align:center;
    position: relative;
    right: 8px;
  }
  .act-item:hover .multi-stream-tag{
      color: #fff;
      border-color: #fff;
  }
</style>
</head>
<body ontouchstart>
<div class="wrap">
        <div id="rm-header" class="header clearfix" data-type="4" data-account="5">
            <div class="top">
                <a class="logo-wrap" href="/console/?c=index&amp;a=index">
					       <img src="http://cdn13.mudu.tv/assets/upload/147071101583626.jpg" style="">
                </a>
                <div class="mid">
                    <a href="index.html" class="nav first active">首页</a>
                    <a href="/console?c=app" class="nav ">频道统计
                    </a>
                    <a href="/console/?c=data&amp;a=userlist" class="nav last " target="_blank">
                        观众画像
                    </a>
                    <a href="/console/?c=media" class="nav ">媒体库</a>
                </div>
                <div class="right-wrap">
                    <div id="msg-txt-wrap" class="hide">
                        <i class="iconfont" title="消息"></i>
                        <span class="num hide">0</span>
                    </div>
                    <div class="user-info act-manager">
                        <!-- <span class="dropDown">
                        	<a class="dropDown_A" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">管理员</a>
							<ul class="dropDown-menu menu radius box-shadow">
								<li><a href="#">多账号管理</a></li>
								<li><a href="#">密码设置</a></li>
								<li><a href="#">退出</a></li>
							</ul>
						</span> -->
						<div class="total-user-info" style="display: none;">
                            <a href="#">多账号管理</a>
                            <a href="#">密码设置</a>
                            <a href="#">退出</a>
                                                                                    
                        </div>
                        <a id="username-link" title="账号设置" href="javascript:void(0)">
                            管理员</a>
                        <i class="iconfont username-arrow"></i>
                    </div>
				    </div>
            </div>
           <div class="link clearfix">
          <div id="rm-channel" class="left">
                    
					<div class="chooseChannel">
					  <strong title="TEST"><i class="iconfont"></i>TEST</strong>
					  <span class="pull-down"></span>
					  <ul id="cChannel" class="hide">
					    <li>
					        <a class="act-item" href="/console/?c=broadcast&amp;a=index&amp;id=200930">
					            <span class="act-name">楚楚1</span>
					            <!-- <span class="multi-stream-tag">多流</span> -->
					        </a>
					     </li>
					    <li>
					        <a class="act-item" href="/console/?c=broadcast&amp;a=index&amp;id=200929">
					            <span class="act-name">测试</span>
					        </a>
					    </li>
					    <li>
					        <a class="act-item" href="/console/?c=broadcast&amp;a=index&amp;id=200458">
					            <span class="act-name">111</span>
					    </a>
					    </li>
					    <li>
					        <a class="act-item" href="/console/?c=broadcast&amp;a=index&amp;id=197381">
					            <span class="act-name">测试</span>
					        </a>
					    </li>
					   </ul>
					</div>
				</div>
        <button type="button" class="ant-btn"><i class="anticon anticon-link"></i><span>观看地址</span></button>

        <ul class="right">
    			<a href="live.html" class="first-child brdcast active">
	            <li>
	                <i class="Hui-iconfont Hui-iconfont-bofang"></i><span>直播控制</span>
	            </li>
	        </a>
	        <a href="set.html" class="cnlmana ">
	            <li>
	                <i class="Hui-iconfont Hui-iconfont-manage2"></i><span>频道管理</span>
	            </li>
	        </a>
	        <a href="audience_statistics.html" class="usermana ">
	            <li>
	                <i class="Hui-iconfont Hui-iconfont-user2"></i><span>观众统计</span>
	            </li>
	        </a>
	        <a href="analysis.html" class="last-child anycal ">
	            <li>
	                <i class="Hui-iconfont Hui-iconfont-shujutongji"></i><span>数据统计</span>
	            </li>
	        </a>
		    </ul>
        </div>
    </div>
        
	</div>
	<div id="rm-footer" class="footer clearfix">
	    <img src="http://cdn13.mudu.tv/assets/upload/147070872782018.png" style="width:390px; height:110px;" alt="目睹直播">
	</div>
</div>
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="lib/jquery-ui/1.9.1/jquery-ui.min.js"></script>
<script type="text/javascript" src="static/js/H-ui.js"></script>
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<script>
  $(function(){
      var userType = $('#rm-header').attr('data-type');
      var cChannel = $('#rm-header').attr('data-account');

      $('.cancel').on('click', function(){
        $('#free-error').addClass('hide');
        $('#rm-mask').addClass('hide');
      });

      var coInputLimit = function(id, countId, max) {
          var inputLimit = function() {
              var num = $(id).val().substr(0,max);
              $(countId).text($(id).val().length);
          };
          $(id).on('keyup', function(){
              $('#rm-error').addClass('hide');
              inputLimit();
          });
      };

      coInputLimit('#title-input', '#title-count', 10);

      var $addBtnClicked=false;
      $('#rm-box-confirm').on('click', function () {
          if ($addBtnClicked == true) {
              return true;
          }
          $addBtnClicked = true;
          if ($('#title-input').val().length === 0) {
              if ($('#title-input').val().length === 0) {
                  error_text = '频道名称不能为空!';
              }

              $('#rm-error').text(error_text);
              $('#rm-error').removeClass('hide');
              $addBtnClicked = false;
              return;
          } else {
              var postTitle = $('#title-input').val();
              var postStart = $('#start').val();
              var postEnd = $('#end').val();

              $.ajax({
                  type: 'post',
                  url: '/console/?a=add&c=index',
                  data: {
                      name: postTitle,
                      start_time: postStart,
                      end_time: postEnd
                  },
              })
                  .done(function (data) {

                      if (JSON.parse(data).status) {
                          location.reload();
                      }else{
                          $addBtnClicked = false;
                      }
                  })
                  .fail(function () {
                      $addBtnClicked = false;
                  })
                  .always(function () {
                  });
          }
      });

      $('.rm-close').on('click', function(){
        $('#add-block').addClass('hide');
        $('#rm-mask').addClass('hide');
        $('#rm-error').addClass('hide');
      });
  });
</script>
</body>
</html>
